package com.sj.szxy.courseschedule.entity;

/**
 * 教师
 * @author Yi Ping
 * @date 2018年3月29日 下午11:37:24 
 * @since 1.0.0
 *
 */
public class Teacher {
	
	private int id;
	private String name;
//	private Set<Subject> subjects = new HashSet<>();  // 所教的课程
	private Subject subject;							//所教学的科目
	private float maxWeeklyCourseTimes;				 // 最大的周课时
	private Grade grade;		//年级
	
	

	/**
	 * @param name2
	 * @param subject
	 */
	public Teacher(String name2, Subject subject) {
		this.name = name2;
		this.subject = subject;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}

	


	public Subject getSubject() {
		return subject;
	}


	public void setSubject(Subject subject) {
		this.subject = subject;
	}


	public float getMaxWeeklyCourseTimes() {
		return maxWeeklyCourseTimes;
	}


	public void setMaxWeeklyCourseTimes(float maxWeeklyCourseTimes) {
		this.maxWeeklyCourseTimes = maxWeeklyCourseTimes;
	}

	

	public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}


	public Grade getGrade() {
		return grade;
	}


	public void setGrade(Grade grade) {
		this.grade = grade;
	}


	@Override
	public String toString() {
		return name;
	}


	public boolean equals(Teacher teacher) {
		if(this.name==null || teacher.getName() == null)
			return false;
		return this.name.equals(teacher.getName());
	}
	
	
}
